package mx.example.com.mvpdemo.ui.login;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import mx.example.com.mvpdemo.R;
import mx.example.com.mvpdemo.base.BaseActivity;

public class LoginActivity extends BaseActivity<LoginContract.Presenter> implements LoginContract.View{

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        /**
         * 调用登录
         * */
        mPresenter.loadLogin("账号","密码");


    }

    @Override
    public void setPresenter(LoginContract.Presenter presenter) {
        if (mPresenter == null) {
            mPresenter = new LoginPresenter(this);
        }
    }

    /**
     * 登录成功回调
     * */
    @Override
    public void showLoginSuccess(String msg) {

    }

    /**
     * 登录失败回调
     * */
    @Override
    public void showLoginError(String msg) {

    }

}
